<?php /* Smarty version 2.6.26, created on 2011-12-05 02:41:09
         compiled from photo.tpl */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'header.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<h3>上传相册照片</h3>
<form action="<?php echo $this->_tpl_vars['baseUrl']; ?>
photo/upPhoto?callback=pic" enctype="multipart/form-data" method="post" target='photo_iframe' >
<input type="hidden" name="id" value="<?php echo $this->_tpl_vars['id']; ?>
" />
<input  name='file[]' type='file' multiple ></input>
<input type='submit' value='上传' />
</form>
<iframe name="photo_iframe" style="display:none" ></iframe>

<div id="pic_box">
</div>
<h3>photo列表</h3>
<?php $_from = $this->_tpl_vars['rs']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?> 
<p><span class='version'><?php echo $this->_tpl_vars['key']; ?>
:
    <?php $_from = $this->_tpl_vars['value']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
?> 
        <?php echo $this->_tpl_vars['k']; ?>
--<?php echo $this->_tpl_vars['v']; ?>

    <?php endforeach; endif; unset($_from); ?>
</span></p>
<?php endforeach; endif; unset($_from); ?>

<?php echo '
<script src=\''; ?>
<?php echo $this->_tpl_vars['baseUrl']; ?>
<?php echo 'public/jquery.js\' ></script>
<script>

function pic(data){
    
    console.log(data);
    var json=eval(\'(\'+data+\')\'); 
    if(true==json[\'isSuc\']){

        window.location.reload();

        /*
        rs=json["pics"];
        
        for(val in rs){
                 
            str ="<div>";
            str+="<img src="+rs[val]+"  />";            
            str+="<input type=\'text\' />";
            str+="</div>";
            $("#pic_box").append(str);
            
        }
        */
        
        
    }
    else{

        alert(上传失败);     

    }

}

</script>
'; ?>


<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'footer.tpl', 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>